import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("sys_role", { schema: "lvlu" })
export class SysRole {
  @PrimaryGeneratedColumn({ type: "int", name: "role_id" })
  roleId: number;

  @Column("varchar", {
    name: "role_name",
    nullable: true,
    comment: "角色名称",
    length: 50,
  })
  roleName: string | null;

  @Column("char", {
    name: "status",
    nullable: true,
    comment: "状态 0：禁用 1：正常",
    length: 1,
  })
  status: string | null;

  @Column("int", { name: "sort", nullable: true, comment: "排序" })
  sort: number | null;

  @Column("varchar", {
    name: "remark",
    nullable: true,
    comment: "备注",
    length: 100,
  })
  remark: string | null;

  @Column("varchar", {
    name: "create_user",
    nullable: true,
    comment: "创建人",
    length: 50,
  })
  createUser: string | null;

  @Column("datetime", {
    name: "create_time",
    nullable: true,
    comment: "创建时间",
  })
  createTime: Date | null;

  @Column("varchar", {
    name: "update_user",
    nullable: true,
    comment: "修改人",
    length: 50,
  })
  updateUser: string | null;

  @Column("datetime", {
    name: "update_time",
    nullable: true,
    comment: "修改时间",
  })
  updateTime: Date | null;
}
